# Maintainer: Jonathan Steel <jsteel at archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Jason Chu <jason@archlinux.org>
# Contributor: Joker-jar <joker-jar@yandex.ru>

pkgname=dgen-sdl
pkgver=1.33
pkgrel=4
pkgdesc="An emulator for Sega Genesis/Mega Drive systems ported to SDL"
arch=('loong64' 'x86_64')
url="https://dgen.sourceforge.net"
license=('BSD')
depends=('sdl' 'libgl' 'libarchive')
[[ $CARCH == i686 ]] && makedepends=('nasm')
source=(https://downloads.sourceforge.net/dgen/$pkgname-$pkgver.tar.gz)
sha512sums=('c98ab8cdced62a5d26fd677ad36b031e756620114c946ac067599e84ae6ebcfab731554dd4337b6314c3b5db4601c8a6cc67c285d2aad136e659b9973c01a749')

build() {
  cd $pkgname-$pkgver

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install

  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
